import xlwings as xw
app = xw.App(visible=False, add_book=False)
workbook = app.books.open('F:\\python\\第4章\\员工档案表2.xlsx')
worksheet = workbook.sheets[0]
area = worksheet.range('A2').expand('table')
area.api.HorizontalAlignment = -4152
area.api.VerticalAlignment = -4108
workbook.save('F:\\python\\第4章\\员工档案表3.xlsx')
workbook.close()
app.quit()
